{extend name="public/base" /}

{block name="title"}<title>{if condition="$data"}{$Think.lang.edit}{else /}{$Think.lang.create}{/if}</title>{/block}

{block name="pjax_container"}
<section class="content-header">
    <h1>项目信息</h1>
    <ol class="breadcrumb">
        <li class="active"><i class="fa fa-dashboard"></i> 项目信息</li>
    </ol>
</section>
<!--   <div class="clearfix">
                    <span class="pull-left">任务 #2</span>
                    <small class="pull-right">70%</small>
                  </div>
                  <div class="progress xs">
                    <div class="progress-bar progress-bar-green" style="width: 70%;"></div>
                  </div>
                </div> -->
<section class="content">
    <div class="row">
        <div class="col-md-12">
            <form class="form-horizontal" method="POST" action="" onsubmit="return false" >
                <div class="nav-tabs-custom">
                    <ul class="nav nav-tabs">
                        <li class="active"><a href="#tab1" data-toggle="tab">{$Think.lang.base_param}</a></li>
                        <li class="pull-right"><a href="javascript:history.back(-1)" class="btn btn-sm" style="padding:10px 2px;"><i class="fa fa-list"></i> {$Think.lang.back}</a></li>
                    </ul>
                    <div class="tab-content">
                        <div class="tab-pane active" id="tab1">
                            <input type="hidden" name="id" value="{$data.id}" />

                            <div class="form-group">
                                <label class="col-sm-2 control-label">{$Think.lang.name}</label>
                                <div class="col-sm-7"><input class="form-control" disabled="disabled" name="name" value="{$data.Users.name}" placeholder="{$Think.lang.name}"></div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-2 control-label">{$Think.lang.title}</label>
                                <div class="col-sm-7"><input class="form-control" name="title" value="{$data.title}" placeholder="{$Think.lang.title}"></div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-2 control-label">{$Think.lang.stime}</label>
                                <div class="col-sm-7">
                                    <div class="input-group">
                                        <input class="form-control timepicker" name="stime" value="{$data.stime|date="Y-m-d",###}" placeholder="{$Think.lang.stime}" >
                                        <div class="input-group-addon"><i class="fa fa-clock-o"></i></div>
                                    </div>
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-2 control-label">{$Think.lang.otime}</label>
                                <div class="col-sm-7">
                                    <div class="input-group">
                                        <input class="form-control timepicker" name="otime" value="{$data.otime|date="Y-m-d",###}" placeholder="{$Think.lang.otime}" >
                                        <div class="input-group-addon"><i class="fa fa-clock-o"></i></div>
                                    </div>
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-2 control-label">{$Think.lang.pro}</label>
                                <div class="col-sm-7"><textarea class="form-control" style="resize:none;height:155px;" name="pro" placeholder="{$Think.lang.pro}">{$data.pro}</textarea></div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-2 control-label">{$Think.lang.design}</label>
                                <div class="col-sm-7"><textarea class="form-control" style="resize:none;height:155px;" name="design" placeholder="{$Think.lang.design}">{$data.design}</textarea></div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-2 control-label">{$Think.lang.front}</label>
                                <div class="col-sm-7"><textarea class="form-control" style="resize:none;height:155px;" name="front" placeholder="{$Think.lang.front}">{$data.front}</textarea></div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-2 control-label">{$Think.lang.after}</label>
                                <div class="col-sm-7"><textarea class="form-control" style="resize:none;height:155px;" name="after" placeholder="{$Think.lang.after}">{$data.after}</textarea></div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-2 control-label">{$Think.lang.test}</label>
                                <div class="col-sm-7"><textarea class="form-control" style="resize:none;height:155px;" name="test" placeholder="{$Think.lang.test}">{$data.test}</textarea></div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-2 control-label">{$Think.lang.status}</label>
                                <div class="col-sm-7">
                                    <select class="form-control select2" name="status" style="width:100%;">
                                        <option value="1" {if condition="$data.status eq '1'"}selected="selected"{/if} >未完成</option>
                                        <option value="0" {if condition="$data.status eq '0'"}selected="selected"{/if} >开发中</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="box-footer">
                        <div class="col-sm-2"></div>
                        <div class="col-sm-7">
                            <div class="btn-group pull-right">
                                <button type="submit" class="btn btn-info pull-right submits" data-loading-text="&lt;i class='fa fa-spinner fa-spin '&gt;&lt;/i&gt; {$Think.lang.submit}">{$Think.lang.submit}</button>
                            </div>
                            <div class="btn-group pull-left">
                                <button type="reset" class="btn btn-warning">{$Think.lang.reset}</button>
                            </div>
                        </div>
                    </div>
                </div>
            </form>
        </div>
    </div>
</section>
<script type="text/javascript">
$(function(){
    /*ajax页面加载icheck，有该控件的页面才需要*/
    $('input[type="checkbox"].minimal, input[type="radio"].minimal').iCheck({
        checkboxClass: 'icheckbox_minimal-blue',
        radioClass: 'iradio_minimal-blue'
    });
    
    /*ajax页面加载icheck，有该控件的页面才需要*/
    $(".select2").select2({language:"zh-CN"});
    
    {if condition=" $rest_login == 1 "}
    restlogin('{$rest_login_info}');   //登录超时
    {/if}
})
</script>
{/block}